package com.wenwei.sharebox.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.wenwei.sharebox.R;
import com.wenwei.sharebox.base.BaseActivity;
import com.wenwei.sharebox.base.Constant;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Administrator on 2017/07/07 0007.
 */
public class UserProvideActivity extends BaseActivity {
    @Bind(R.id.base_back)
    ImageView baseBack;
    @Bind(R.id.base_title)
    TextView baseTitle;

    @Override
    public int setLayoutResourceId() {
        return R.layout.activity_user_provide;
    }

    @Override
    protected void initView() {
        super.initView();
        baseTitle.setText("供货");
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }

    @OnClick({R.id.base_back, R.id.user_provide_check, R.id.user_provide_supplement,R.id.user_provide_xiu})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.base_back:
                finish();
                break;
            case R.id.user_provide_check:
                Bundle checkBundle = new Bundle();
                checkBundle.putInt("qr_type", Constant.QR_TYPE_CHECK);
                goActivity(mContext, QRcodeActivity.class,checkBundle);
//                goActivity(mContext,ProvideCheckActivity.class);
                break;
            case R.id.user_provide_supplement:
                Bundle rpmBundle = new Bundle();
                rpmBundle.putInt("qr_type", Constant.QR_TYPE_REPLENISHMENT);
                goActivity(mContext, QRcodeActivity.class,rpmBundle);
//                goActivity(mContext,ReplenishmentActivity.class);
                break;
            case R.id.user_provide_xiu:
                Bundle repairBundle = new Bundle();
                repairBundle.putInt("qr_type", Constant.QR_TYPE_REPAIR);
                goActivity(mContext, QRcodeActivity.class,repairBundle);
                break;
        }
    }
}
